package com.example.tests;

public class ContactData implements Comparable<ContactData> {
	private String firstname;
	private String lastname;
	private String address;
	private String hometel;
	private String mobiltel;
	private String worktel;
	private String email;
	private String email2;
	private String bday;
	private String bmonth;
	private String byear;
	private String group;
	private String addressdop;
	private String phone2;

	public ContactData(String firstname, String lastname,
            String address, String hometel, String mobiltel, String worktel,
            String email, String email2, String bday,
            String bmonth, String byear,
            String group, String addressdop, String phone2) {
		
		this.firstname = firstname;
        this.lastname = lastname;
        this.address = address;
        this.hometel = hometel;
        this.mobiltel = mobiltel;
        this.worktel = worktel;
        this.email = email;
        this.email2 = email2;
        this.bday=bday;
        this.bmonth=bmonth;
        this.byear=byear;
        this.group = group;
        this.addressdop = addressdop;
        this.phone2 = phone2;
	}

	public ContactData() {
	}

	@Override
	public int compareTo(ContactData other) {
		return this.firstname.toLowerCase().compareTo(
				other.firstname.toLowerCase());
	}

	@Override
	public int hashCode() {
		int result = 1;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactData other = (ContactData) obj;
		if (firstname == null) {
			if (other.firstname != null)
				return false;
		} else if (!firstname.equals(other.firstname))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "ContactData [firstname=" + firstname + "]";
	}

	public String getFirstname() {
		return firstname;
	}

	public String getLastname() {
		return lastname;
	}

	public String getAddress() {
		return address;
	}

	public String getHometel() {
		return hometel;
	}

	public String getMobiltel() {
		return mobiltel;
	}

	public String getWorktel() {
		return worktel;
	}

	public String getEmail() {
		return email;
	}

	public String getEmail2() {
		return email2;
	}

	public String getAddressdop() {
		return addressdop;
	}

	public String getPhone2() {		
		return phone2;
	}

	public String getBday() {
		return bday;
	}

	public String getBmonth() {
		return bmonth;
	}

	public String getByear() {
		return byear;
	}
	
	public String getGroup() {
		return group;
	}
	
	public ContactData withFirstname(String firstname) {
		this.firstname=firstname;
		return this;
	}
	
	public ContactData withLastname(String lastname) {
		this.lastname=lastname;
		return this;
	}
	
	public ContactData withAddress(String address) {
		this.address=address;
		return this;
	}
	
	public ContactData withHometel(String hometel) {
		this.hometel=hometel;
		return this;
	}
	public ContactData withMobiltel(String mobiltel) {
		this.mobiltel=mobiltel;
		return this;
	}
	
	public ContactData withWorktel(String worktel) {
		this.worktel=worktel;
		return this;
	}
	
	public ContactData withEmail(String email) {
		this.email=email;
		return this;
	}
	
	public ContactData withEmail2(String email2) {
		this.email2=email2;
		return this;
	}
	
	public ContactData withAddressdop(String addressdop) {
		this.addressdop=addressdop;
		return this;
	}
	
	public ContactData withPhone2(String phone2) {
		this.phone2=phone2;
		return this;
	}
	
	public ContactData withBday(String bday) {
		this.bday=bday;
		return this;
	}
	
	public ContactData withBmohth(String bmonth) {
		this.bmonth=bmonth;
		return this;
	}
	
	public ContactData withByear(String byear) {
		this.byear=byear;
		return this;
	}
	
	public ContactData withGroup(String group) {
		this.group=group;
		return this;
	}
}